An important feature of a database management system (“DBMS”) is to process as a transaction a set of operations that change information in a database. A transaction is a logical unit of work that is performed as an atomic unit. In database management systems, all changes made by a transaction must be either committed or “rolled back”. When a transaction is committed, all of the changes specified by the transaction are made permanent. On the other hand, when a transaction is rolled back, all of the changes specified by the transaction already made are retracted or undone, as if the changes were never made. Operations that are performed as part of a transaction are referred to herein as transaction operations.
There are two general categories of transactions on DBMSs: local transactions and distributed transactions. A local transaction is coordinated entirely within a single DBMS. A distributed transaction, on the other hand, is performed on multiple database instances, each of which executes a “subtransaction” that is part of the distributed transaction.
A distributed transaction is typically initiated on a “local” DBMS executing a “parent transaction”. The local DBMS initiates a “child” subtransaction on one or more other “remote” DBMSs. The remote DBMSs may, in turn, initiate “child” subtransactions on additional remote DBMSs. The DBMSs that participate in the execution of a distributed transaction are referred to as participants with respect to the distributed transaction.
Initiating another transaction on a remote participant requires establishing a database session with the other DBMSs. A session, such as database session, is a particular connection established for a client and a computer system, such as a DBMS, through which a series of requests may be made. The requests are carried out by one or more session processes. The requests, which may be in the form of function or remote procedure invocations, include requests to begin execution of a transaction, to execute queries, to perform updates and other types of transaction operations, to commit or otherwise terminate a transaction, and to terminate a database session.
The DBMS on which a database session is established maintains session state data that reflects the current state of a database session. Such information contains, for example, the identity of the user (e.g. DBMS) for which the session was established, the session transaction state, and temporary variable values generated by processes executing software within a session. The transaction state is information about a transaction currently being executed by a process within the session.